Integrand size = 26, antiderivative size = 224 \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {e^2 x}{c}+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )} \]
[Out]
Time = 0.30 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1438, 1436, 251} \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {x \left (\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {x \left (-\frac {-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2}{\sqrt {b^2-4 a c}}-b e^2+2 c d e\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (\sqrt {b^2-4 a c}+b\right )}+\frac {e^2 x}{c} \]
[In]
[Out]
Rule 251
Rule 1436
Rule 1438
Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {e^2}{c}+\frac {c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{c \left (a+b x^n+c x^{2 n}\right )}\right ) \, dx \\ & = \frac {e^2 x}{c}+\frac {\int \frac {c d^2-a e^2+\left (2 c d e-b e^2\right ) x^n}{a+b x^n+c x^{2 n}} \, dx}{c} \\ & = \frac {e^2 x}{c}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}+\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c}+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \int \frac {1}{\frac {b}{2}-\frac {1}{2} \sqrt {b^2-4 a c}+c x^n} \, dx}{2 c} \\ & = \frac {e^2 x}{c}+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )}{c \left (b-\sqrt {b^2-4 a c}\right )}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{c \left (b+\sqrt {b^2-4 a c}\right )} \\ \end{align*}
Time = 0.56 (sec) , antiderivative size = 216, normalized size of antiderivative = 0.96 \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\frac {x \left (e^2+\frac {\left (2 c d e-b e^2+\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )}{b-\sqrt {b^2-4 a c}}+\frac {\left (2 c d e-b e^2-\frac {2 c^2 d^2+b^2 e^2-2 c e (b d+a e)}{\sqrt {b^2-4 a c}}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{n},1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{b+\sqrt {b^2-4 a c}}\right )}{c} \]
[In]
[Out]
\[\int \frac {\left (d +e \,x^{n}\right )^{2}}{a +b \,x^{n}+c \,x^{2 n}}d x\]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int \frac {\left (d + e x^{n}\right )^{2}}{a + b x^{n} + c x^{2 n}}\, dx \]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a} \,d x } \]
[In]
[Out]
\[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int { \frac {{\left (e x^{n} + d\right )}^{2}}{c x^{2 \, n} + b x^{n} + a} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {\left (d+e x^n\right )^2}{a+b x^n+c x^{2 n}} \, dx=\int \frac {{\left (d+e\,x^n\right )}^2}{a+b\,x^n+c\,x^{2\,n}} \,d x \]
[In]
[Out]